import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

import authRouter from './authRouter'
import platform from './platform'
import accountManage from './accountManage'
import app from './app'
import channel from './channel'

var customRouter = [
  authRouter,
  platform,
  accountManage,
  app,
  channel
];


var routes =  [
  {
    name:"首页面板",
    path:"/",
    component:()=>import("@V/index/index"),
    meta:{
      keepAlive:true
    }
  },
  {
    name:"首页面板",
    path:"/index",
    component:()=>import("@V/index/index"),
    meta:{
      keepAlive:true
    }
  },
  
];

function _extends(r){
  r.forEach(item => {
    routes.push(item);
  });
}

customRouter.forEach(item => {
  _extends(item);
});


export default new Router({
  //mode: 'history',
  routes:routes
})
